//
//  PredicateInfoCell.swift
//  HuaYun
//
//  Created by enghou on 2018/12/19.
//  Copyright © 2018 xyxorigation. All rights reserved.
//

import UIKit

class PredicateInfoCell: UITableViewCell {

    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var predicateLabel: UILabel!
    @IBOutlet weak var executeLabel: UILabel!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    var _model: JSON?
    var model: JSON?{
        get{
            return _model
        }
        set{
            _model = newValue
            self.nameLabel.text = _model?.contents?["name"]?.rawString()
            let yusuan = _model?.contents?["yusuan"]?.int ?? 0
            self.predicateLabel.text = String(yusuan / 100).rmbformat
            let zhixing = _model?.contents?["zhixing"]?.int ?? 0
            self.executeLabel.text = String(zhixing / 100).rmbformat
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
